﻿@using System.Data
@using ZoomLa.AppCode.Controls
@model ZoomLa.Model.M_CommonData
@functions{
    private string GetState(string state)
    {
        switch (state)
        {
            case "0": return "普通";
            case "1": return "推荐";
            case "2": return "关闭";
            default: return "";
        }
    }
}
@{
    DataRow dr = ViewBag.dr;
    DataTable styleDt = ViewBag.styleDt;
    
}
@section head{
    <title>店铺主页</title>
    <script type="text/javascript" charset="utf-8" src="/Plugins/Ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Plugins/Ueditor/ueditor.all.min.js"></script>
}
@section content{
    <div id="pageflag" data-nav="shop" data-ban="store"></div>
    <div class="container margin_t5">
        <ol class="breadcrumb">
            <li><a title="会员中心" href="@Url.Action("Default","")">会员中心</a></li>
            <li><a href="ProductList">我的店铺</a></li>
            <li class="active">
                店铺主页
                <a href='/Store/StoreIndex?id=@Model.GeneralID' target='_blank'> [浏览店铺]</a>
            </li>
        </ol>
    </div>
    <form method="post" action="UserShop_Edit">
        <div class="container">
            <div class="u_shop_body">
                <div class="btn_green">
                    @Html.Partial("UserShopTop")
                </div>
                <table class="table table-striped table-bordered table-hover btn_green" style="margin-top: 10px;">
                    <tr>
                        <td class="text-right">商铺名称：</td>
                        <td>
                            <input type="text" id="StoreName_T" name="StoreName_T" class="form-control text_md required" value="@Model.Title" />
                            <span class="r_red">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="text-right">商铺信用积分：</td>
                        <td>@dr["StoreCredit"]</td> 
                    </tr>
                    <tr>
                        <td class="text-right">商铺状态：</td>
                        <td>@GetState(dr["StoreCommendState"].ToString())</td>
                    </tr>
                    <tr>
                        <td class="text-right">商品风格样式：</td>
                        <td>
                            @Html.Partial("C_TemplateView", new C_TemplateView(styleDt) { IsFirstSelect = false })
                        </td>
                    </tr>
                    @*<tr>
                            <td class="text-center">商铺风格模板</td>
                            <td>@Html.DropDownList("SSTDownList", ViewBag.sstdp as SelectList, new { @class = "form-control text_md" })</td>
                        </tr>*@
                    @*<tr>
                            <td class="text-center">模板效果预览</td>
                            <td><img  style="width:150px;height:100px;" src="@ViewBag.sstimg" onerror="shownopic(this);"/></td>
                        </tr>*@
                    @MvcHtmlString.Create(ViewBag.modelhtml)
                    <tr>
                        <td colspan="2" class="text-center">
                            <input type="submit" value="信息修改" class="btn btn-primary" />
                            <input type="button" value="返回" class="btn btn-primary" onclick="javascript: history.go(-1)" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </form>
}
@section script{
    <script src="/JS/DatePicker/WdatePicker.js"></script>
    <script src="/JS/Common.js"></script>
    <script src="/JS/Controls/ZL_Dialog.js"></script>
    <script src="/JS/ICMS/ZL_Common.js"></script>
    <script src="/JS/ZL_Content.js"></script>
    <script>
        function opentitle(url, title) {
            comdiag.reload = true;
            comdiag.maxbtn = false;
            ShowComDiag(url, title);
        }
        function closdlg() {
            CloseComDiag();
        }
        $(function () {
            $('#TempleID_Hid').val('@Model.DefaultSkins');
            initTlp();
            $("form").validate();
        })
    </script>
}
